/**
 * @Author: 焦质晔
 * @Date: 2019/6/20
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2019-12-15 15:21:28
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';
// 列表查询
export const getList = (params) => axios.post(`${SERVER.WHOLESALES}/ttVsDemandPlan1SideB/page`, params)
// 获取计划明细
export const getDetailById = (params) => axios.get(`${SERVER.WHOLESALES}/ttVsDemandPlan1SideB/queryPlan1ById`, { params })
// 保存B端提报计划
export const savePlan1 = (params) => axios.post(`${SERVER.WHOLESALES}/ttVsDemandPlan1SideB/savePlan1`, params)
//  导出
export const exportList = (params) => axios.post(`${SERVER.WHOLESALES}/ttVsDemandPlan1SideB/oemExport`, params, { responseType: 'blob' })
// / 导出
export const exporturl = params => axios.post(`/api/cmscloud.excel/downloadExcel/exportExcel/${params.CODE}`, params);
// 查询操作记录
export const getLog = (params) => axios.get(`${SERVER.WHOLESALES}/ttVsDemandPlan1SideB/queryPlan1LogyId`, {params})

// // 查询详情
// export const getDetail = (params) => axios.get(`${SERVER.WHOLESALES}/orderGoods/getOrderById`, { params })
// // 获取车辆列表
// export const getCarList = (params) => axios.post(`${SERVER.BASEDATA}/productGroup/queryList`, params)
// //获取经销商余额池
// export const getAmount = (params) => axios.get(`${SERVER.WHOLESALES}/orderGoods/getAmount`, {params})
// //获取折扣和返利信息
// export const getDiscount = (params) => axios.post(`${SERVER.WHOLESALES}/orderGoods/getDiscount`, params)
// 获取经销商收车地址
// export const getDealerAddress = (params) => axios.get(`${SERVER.WHOLESALES}/dealerAddress/getDealerAddress`, {params})
// export const queryDealerAddress = () => axios.post(`${SERVER.WHOLESALES}/ttVsDemandPlan1SideB/queryDealerAddress`);

// // 获取折扣详情
// export const getDiscountDetails = (params) => axios.get(`${SERVER.WHOLESALES}/orderGoods/getDiscountDetails`, { params })
// // 获取所有车辆折扣
// // 获取折扣详情
// export const getAllDiscount = (params) => axios.post(`${SERVER.WHOLESALES}/orderGoods/getAllDiscount`, params)
// // 车辆配置五级选择
// export const vehicleConfiguration = (id, params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/productInfo/productTreeNew`, { params: { type: id, level: 6, ...params } });
// // 获取订单细分类型
// export const getNotPage = (params) => axios.get(`${SERVER.WHOLESALES}/fiOrderTypeSub/searchFiOrderTypeSubDTOListNotPage`, { params })
// // 删除
// export const deleteOrderById = (params) => axios.get(`${SERVER.WHOLESALES}/orderGoods/deleteOrderById`, { params })
// // 提报
// export const subOrderById = (params) => axios.get(`${SERVER.WHOLESALES}/orderGoods/subOrderById`, { params })
//获取登录用户信息
export const getLoginUser = params => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/basedata/users//loginuser`);